<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Hot Topic @ Twitter</title>

    <!-- Bootstrap -->
    <link href="../bootstrap-3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <link href="../bootstrap-3.3.5/datetime/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    <!-- Custom styles for this template -->
    <link href="../css/custom.css" rel="stylesheet">
    <link href="../vis/vis.css" rel="stylesheet">
    
  </head>
  <body>
    <nav class="navbar navbar-inverse" style="margin-bottom:0">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" href="index.html">Hot Topic @Twitter</a>
       </div>
       <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li class=""><a href="index.html">Hot Topic</a></li>
            <li class="dropdown active">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Sample 
                <span class="caret"></span></a>
              <ul class="dropdown-menu">
                <li class="dropdown-header">Sample Analysis</li>
                <li><a href="degree.html">Degree Distribution</a></li>
                <li><a href="like.html">Twitter Like</a></li>
                <li><a href="#">Follow Who</a></li>
              </ul>
            </li>
            <li><a href="contact.html">Contact</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>
    
    
    <br/>
    <div class="container" style="padding: 10px 15px 0;">
        <div class="panel panel-primary">
            <div class="panel-heading">
              <h3 class="panel-title">Social Trust Relations</h3>
            </div>
            <div class="panel-body">
                According to the retweet relations, calculate the frequency of the retweets, and acquire the Social Trust Relations.
            </div>
        </div>
    </div>
    <br/>
   
    <div class="container">
        <div class="col">
            
            <div class="panel panel-info ">
                <div class="panel-heading">
                    <h3 class="panel-title">Hot Twitter</h3>
                </div>
                <div class="panel-body row-sm-6">
                    <div id="networkchart" style="height:600px;"></div>
                </div>
            </div>
            
            
        </div>
        
    </div><!-- /container -->
    
    
    <footer class="footer">
      <div class="container">
        <p class="text-muted" align="center">
            &copy; Project For CMSC5733 Social Computing 2015 @CUHK
        </p>
      </div>
    </footer>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <!-- <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script> -->
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="../bootstrap-3.3.5/js/bootstrap.min.js"></script>

    <!-- Charts ======================================================================================= -->
    
    <!-- Network Chart -->
    <script src="../vis/vis.js"></script>
    <script type="text/javascript">
    var nodes = null;
    var edges = null;
    var network = null;

    function drawnetwork() {
      // create people.
      // value corresponds with the age of the person
      nodes = [
        {id: 437523529,  value: 40,  label: '437523529' },
        {id: 927647598,  value: 10, label: '927647598'},
        {id: 2759013270,  value: 10, label: '2759013270'},
        {id: 2654373980,  value: 10, label: '2654373980' },
        {id: 2653897764,  value: 10, label: '2653897764' },
        {id: 208361818,  value: 30, label: '208361818'},
        {id: 391362483,  value: 10,  label: '391362483'},
        {id: 31206407,  value: 10,  label: '31206407'},
        {id: 264694385,  value: 10, label: '264694385'},
        {id: 1702148870, value: 40, label: '1702148870'},
        {id: 2902062601, value: 10, label: '2902062601'},
        {id: 2902046294, value: 10, label: '2902046294'},
        {id: 2902030526, value: 10, label: '2902030526'},
        {id: 81126713, value: 10, label: '81126713'},
      ];

      // create connections between people
      // value corresponds with the amount of contact between two people
      edges = [
        {from: 927647598, to: 437523529, value: 1, arrows: 'to', title: '50times'},
        {from: 2759013270, to: 437523529, value: 1, arrows: 'to', title: '50times'},
        {from: 2654373980, to: 437523529,value: 1, arrows: 'to', title: '50times'},
        {from: 2653897764, to: 437523529, value: 1, arrows: 'to', title: '50times'},
        {from: 391362483, to: 208361818, value: 1, arrows: 'to', title: '49times'},
        {from: 31206407, to: 208361818, value: 1, arrows: 'to', title: '49times'},
        {from: 264694385, to: 208361818,value: 1, arrows: 'to', title: '49times'},
        {from: 2902062601, to: 1702148870, value: 1, arrows: 'to', title: '48times'},
        {from: 2902046294, to: 1702148870, value: 1, arrows: 'to', title: '48times'},
        {from: 2902030526, to: 1702148870, value: 1, arrows: 'to', title: '48times'},
        {from: 81126713, to: 1702148870, value: 1, arrows: 'to', title: '48times'}
      ];

      // Instantiate our network object.
      var container = document.getElementById('networkchart');
      var data = {
        nodes: nodes,
        edges: edges
      };
      var options = {
        nodes: {
          shape: 'dot',
          scaling:{
            label: {
              min:8,
              max:20
            }
          }
        }
      };
      
      network = new vis.Network(container, data, options);
    }
    
    
    </script>
    
    <!-- Line Chart -->
    <script src="../Chart.js.1.2/Chart.js"></script>
    <script type="text/javascript">
          
    window.onload = function(){
        
        drawnetwork();
       
    }

    </script>
    
    <script src="../vis/googleAnalytics.js"></script>
    
  </body>
</html>
